<?php


namespace App\Models\Admin;


class GoodsStandardName extends Base
{
    protected $table = 'goods_standard_name';
    protected $guarded = [];
    public $timestamps = false;

    public static function addNames($goods_standard_id,$name_list=[])
    {
        self::where('goods_standard_id',$goods_standard_id)->delete();
        foreach ($name_list as $k => $name){
            $data=[
                'goods_standard_id'=>$goods_standard_id,
                'name'=>$name,
            ];
            self::add($data);
        }

    }
}
